package com.mx.service.impl;

import com.mx.mapper.ArticleMapper;
import com.mx.pojo.Article;
import com.mx.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ArticleServiceImpl implements ArticleService {

    @Autowired
    ArticleMapper articleMapper;

    @Override
    public List<Article> findAll() {
        return articleMapper.findAll();
    }

    @Override
    public Article findId(int id) {
        return articleMapper.findId(id);
    }

    @Override
    public int save(Article article) {
        return articleMapper.save(article);
    }

    @Override
    public int delete(int id) {
        return articleMapper.delete(id);
    }

    @Override
    public int update(Article article) {
        return articleMapper.update(article);
    }
}
